package com.tech.platform.cms.authz.common.exception;

import com.tech.platform.cms.common.constant.Constant;

public class NoAuthorizationTokenException extends RuntimeException{

    private Integer code;
    private String errorMessage;

    public NoAuthorizationTokenException() {
        super("系统未认证！");
        this.code = Constant.AUTHORIZATIONERROR;
        this.errorMessage = "系统未认证！";
    }

    public NoAuthorizationTokenException(int code,String msg){
        super(msg);
        this.code = code;
        this.errorMessage = msg;
    }

    public NoAuthorizationTokenException(Exception exception) {
        super(exception.getMessage());
        this.code = Constant.AUTHORIZATIONERROR;
        this.errorMessage = exception.getMessage();
    }
}
